/*
 * This file (RxPointCloud.java) is protected by the GNU GPL licence (v2). 
 * Please read the license.txt attached for further informations. 
 * 
 */

package alkwarel.shapes;

import alkwarel.objects.AkArtspace;
import alkwarel.objects.RxShape;
import artx.utils.AxRandom;

/**
 * @author Xavier Gouchet
 * 
 */
public class RxPointCloud extends RxShape {

	/**
	 * Standard Constructor
	 */
	public RxPointCloud() {
		super(5, "pointcloud");
	}

	/**
	 * @see alkwarel.objects.RxShape#Draw(alkwarel.objects.AkArtspace)
	 */
	protected boolean Draw(AkArtspace a) {
		int al = 1;
	    int xc = 0 ; 
	    int yc = 0 ;
		for (int r = 0; r < 100; r++) {
			if (al != 999) {
				if (al / 10 == 0)
					xc = AxRandom.RandI(a.width);
				else {
					xc = ((al / 10 - 1) * a.width) / 10	+ AxRandom.RandI(16);
					xc = Math.max(Math.min(xc,a.width), 0);
				}

				if (al % 10 == 0)
					yc = AxRandom.RandI(a.height);
				else {
					yc = ((al % 10 - 1) * a.height) / 9
							+ AxRandom.RandI(9);
					yc = Math.max(Math.min(xc,a.height), 0);
				}
			}
			// DISCUSS and now...what?
		}
		;
		return true;
	}

}
